<%@ include file="/WEB-INF/views/include.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><fmt:message key="title" /></title>
<!-- <style type="text/css" src="static/styles/application.css"></style> -->
<link href="static/styles/application.css" rel="stylesheet"
	type="text/css" media="screen" />
<link type="text/css"
	href="css/pepper-grinder/jquery-ui-1.8.21.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.21.custom.min.js"></script>
<script type="text/javascript" src="static/scripts/jquery.validate.js"></script>

<script type="text/javascript">
	$(function() {
		$(window).resize(displayDimensions);
		displayDimensions();

	});

	function displayDimensions() {
		$('#display').html(
				$('#mainBody').width() + 'x' + $('#mainBody').height());
	}

	$(document).ready(function() {

		$.validator.addMethod("matchDni", function(value, element) {
			if (/^([0-9]{8})*[a-zA-Z]+$/.test(value)) {
				var numero = value.substr(0, value.length - 1);
				var let = value.substr(value.length - 1, 1);
				numero = numero % 23;
				var letra = 'TRWAGMYFPDXBNJZSQVHLCKET';
				letra = letra.substring(numero, numero + 1);
				if (letra == let.toUpperCase())
					return true;
				return false;
			}
			return this.optional(element);
		});



	});

	$(function() {
		$('#tabs').tabs({
			load : function(event, ui) {
				$(ui.panel).delegate('a', 'click', function(event) {
					$(ui.panel).load(this.href);
					event.preventDefault();
				});
			}
		});
		//$("#tabs").tabs('select', window.location.href); // switch to third tab	
		//alert("a: " + window.location.href);
	 
	});
</script>



</head>


<body class="centered" id="mainBody">
	<h1>
		<fmt:message key="heading" />
	</h1>
	<%-- 	<p>
		<fmt:message key="greeting" />
		<c:out value="${model.now}" />
	</p> --%>
	<div class="menu">

		<div id="tabs">
			<ul>
				<li><a href="clientes.html"><fmt:message
							key="generic.clients" /></a></li>
				<li><a href="bills.html"><fmt:message key="generic.bills" /></a></li>
				<li><a href="products.html"><fmt:message
							key="generic.products" /></a></li>
				<li><a href="basura.html"><fmt:message
							key="generic.providers" /></a></li>
			</ul>
		</div>
	</div>
</body>
</html>
